import request from '@/utils/request'

// 查询预录入车辆备案列表
export function listPreVehicleRecording(query) {
  return request({
    url: '/kmwlpts/preVehicleRecording/list',
    method: 'get',
    params: query
  })
}

// 查询预录入车辆备案列表
export function serachListPreVehicleRecording(query) {
  return request({
    url: '/kmwlpts/preVehicleRecording/searchList',
    method: 'get',
    params: query
  })
}

// 查询预录入车辆备案列表
export function expiredListVehicleRecording(query) {
  return request({
    url: '/kmwlpts/preVehicleRecording/expiredList',
    method: 'get',
    params: query
  })
}


// 查询预录入车辆备案详细
export function getPreVehicleRecording(id) {
  return request({
    url: '/kmwlpts/preVehicleRecording/' + id,
    method: 'get'
  })
}

// 新增预录入车辆备案
export function addPreVehicleRecording(data) {
  return request({
    url: '/kmwlpts/preVehicleRecording/save',
    method: 'post',
    data: data
  })
}

// 修改预录入车辆备案
export function updatePreVehicleRecording(data) {
  return request({
    url: '/kmwlpts/preVehicleRecording/update',
    method: 'put',
    data: data
  })
}

// 绑定IC卡
export function bindIcPreVehicleRecording(data) {
  return request({
    url: '/kmwlpts/preVehicleRecording/bindIc',
    method: 'post',
    data: data
  })
}

// 解绑IC卡
export function unbindIcPreVehicleRecording(data) {
  return request({
    url: '/kmwlpts/preVehicleRecording/unbindIc',
    method: 'post',
    data: data
  })
}

// 删除预录入车辆备案
export function delPreVehicleRecording(id) {
  return request({
    url: '/kmwlpts/preVehicleRecording/' + id,
    method: 'delete'
  })
}

// 导出预录入车辆备案
export function exportPreVehicleRecording(query) {
  return request({
    url: '/kmwlpts/preVehicleRecording/export',
    method: 'get',
    params: query
  })
}

// 检查预录入车辆备案
export function checkVehicle(data) {
  return request({
    url: '/kmwlpts/preVehicleRecording/checkVehicleRec',
    method: 'post',
    data
  })
}

//申报车辆备案信息
export function declareVehicle(id) {
  return request({
    url: '/kmwlpts/preVehicleRecording/declare/' + id,
    method: 'post'
  })
}

export function unBindBsPreVehicleRecording(id) {
  return request({
    url: '/kmwlpts/preVehicleRecording/unbindBs/' + id,
    method: 'post'
  })
}

export function rebackPreVehicleRecording(id) {
  return request({
    url: '/kmwlpts/preVehicleRecording/reback/' + id,
    method: 'post'
  })
}


//根据车牌号查询运管车辆备案信息
export function selectRoadVeRecordVo(query) {
  return request({
    url: '/kmwlpts/preVehicleRecording/selectRoadVeRecordVo',
    method: 'get',
    params: query
  })
}


// 查询预录入车辆备案列表
export function listPreVehicleRecordingForGbills(query) {
  return request({
    url: '/kmwlpts/preVehicleRecording/listVeForGbills',
    method: 'get',
    params: query
  })
}


// 修改车辆备案超级按钮
export function superUpdatePreVehicleRecording(data) {
  return request({
    url: '/kmwlpts/preVehicleRecording/superUpdate',
    method: 'put',
    data: data
  })
}
